//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#pragma once

#include "Graphics/Resources/Sprite2D.h"
#include "Graphics/Loaders/TextureLoader.h"

namespace Engine
{
namespace Graphics
{

	//
	// Sprite Loader
	//

	struct SpriteLoader
	{
	public:
		SpriteLoader ();
		
		void Register (ResourceManager *rm);
		void Unregister (ResourceManager *rm);

		static bool Load (ResourcePtr &resource, const RFilePtr &file, void *parameter,
						  const Resource::ResLoadParams &loadParams, const EngineSubSystemsRef ess);

	private:
		static bool _LoadSprite (ResourcePtr &resource, const RFilePtr &file, void *parameter,
								 const Sprite2D::SpriteLoadParams &loadParams, const EngineSubSystemsRef ess);
	};


}	// Graphics
}	// Engine